project(hulion)
cmake_minimum_required(VERSION 2.8)
aux_source_directory(./src SRC_LIST1)
aux_source_directory(./units SRC_LIST2)

message(${CMAKE_SOURCE_DIR})

if(CMAKE_COMPILER_IS_GNUCXX)
	#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -Wall -pedantic -fno-strict-aliasing")
	#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -Wall -pedantic -O3 -fno-rtti -fno-exceptions -Ofast -flto -ffast-math -funroll-loops")
	#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive -Wall -fno-omit-frame-pointer -pedantic")
	#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fno-omit-frame-pointer")
	set(CMAKE_CXX_FLAGS_DEBUG   "${CMAKE_CXX_FLAGS_DEBUG}   -Wall -fno-omit-frame-pointer -pedantic")
	set(CMAKE_CXX_FLAGS_RELEASE " -O3 -DNDEBUG -Wall -pedantic -fno-rtti -fno-exceptions -Ofast -flto -ffast-math -funroll-loops -msse -mstackrealign")
endif()

message("flags1" ${CMAKE_CXX_FLAGS})
message("flags2" ${CMAKE_CXX_FLAGS_RELEASE})
message("flags3" ${CMAKE_CXX_FLAGS_DEBUG})

add_executable(${PROJECT_NAME} ${SRC_LIST1} ${SRC_LIST2})
include_directories(${CMAKE_SOURCE_DIR}/units)
include_directories(${CMAKE_SOURCE_DIR}/src)

